<template>
    <div class="demo-1">
        <div class="main">
            <slot></slot>
            <!-- <div class="container" style="background-color: #eee;" v-for="item in navLists" :key="item">{{item}}</div> -->
            <ScrollsideNavBar :navLists="navLists"></ScrollsideNavBar>
        </div>
        <div class="footer">
            <!-- <el-button 
                type="primary"
            >
                保存
            </el-button> -->
            <slot name="footer"></slot>
        </div>
    </div>
</template>
  
<script lang="ts" setup>
    import { ref, reactive, markRaw, onBeforeMount, onMounted, onBeforeUnmount, nextTick, computed, watch } from 'vue'
    import type { Ref, Raw } from 'vue'
    import { useRoute, useRouter } from 'vue-router'
    import { storeToRefs } from 'pinia'
    import { useStore } from '@/store'
    import ScrollsideNavBar from '@/components/scrollsideNavBar/ScrollsideNavBar.vue'

    // const navLists:Ref<string[]> = ref(["标题1", "标题2", "标题3", "标题4","标题5"])
    // const props = withDefaults(defineProps<{
    //     isFoldNum?: number, 
    // }>(), {
    //     isFoldNum: 20,
    // })
    const { navLists = [] } = defineProps<{
        navLists?: string[], 
    }>()
    
</script>
  
<style lang="scss" scoped>
    // 没有按钮就是这个general-operation-box-1，再把main里的内容放外面，有按钮就是general-operation-box-2
    .demo-1 {
        @include general-operation-box-2;
    }
    .main {
        @include general-operation-main;
    }
    // .container {
    //     width: 100%;
    //     height: 600px;
    //     font-size: 80px;
    //     display: flex;
    //     justify-content: center;
    //     align-items: center;
    //     border: 2px solid black;
    // }
    .footer {
        display: flex;
        justify-content: center;
        padding-top: 10px;
    }
</style>
